package com.fbms.module.system.enums;

/**
 * 用户状态
 * 
 * @author ruoyi
 */
public enum UserStatusEnums
{
    OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");

    private final String code;
    private final String info;

    UserStatusEnums(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }
    /**
     * 是否停用
     * @param code 状态
     * @return true-停用
     */
    public static boolean isDisable(String code){
        return DISABLE.code.equals(code);
    }

    /**
     * 是否删除
     * @param code 状态
     * @return true-删除
     */
    public static boolean isDeleted(String code){
        return DELETED.code.equals(code);
    }
}
